<template>
  <div id="direct" style="background: white">
    <div style="width: 100%; height: auto">
      <img :src="img" alt="" style="width: 100%; height: 100%" />
    </div>
  </div>
</template>
<script>
import { Toast } from 'vant';
import { directer } from '@/api/api';
export default {
  name: 'direct',
  data() {
    return {
      img: '',
    };
  },
  created() {
    this.getimg();
  },
  methods: {
    getimg() {
      directer({ id: this.$route.params.id }).then((res) => {
        this.img = res.data.data.url;
        console.log(res)
      });
    },
  },

  components: {
    [Toast.name]: Toast,
  },
};
</script>
<style lang = "scss">
* {
  padding: 0;
  margin: 0;
}
.view-router {
  padding-bottom: 0px !important;
}
</style>